package com.softtek.base.business.dao;


import com.softtek.base.domain.DepartmentInfo;
import com.softtek.base.domain.VO.DepartmentChannelVO;
import com.softtek.base.domain.VO.RegionVO;

import java.util.List;
import java.util.Map;

/**
 * Author: val.jzp
 */
public interface DepartmentInfoDao {

    public List<DepartmentInfo> findByType(String departmentChannel,String departmentNum);

    public List<DepartmentChannelVO> countChannel();

    public List<DepartmentInfo> findByKaSr(String type,String departmentChannel);

    /**
     *  获取某个区域中所有的有效门店
     */
    public int countByKaSrAndCanUserDepartment(String departmentChannel);

    /**
     * 获取某个区域中问题1的数量
     */
    public int countQuestionOneAnswer(String type,String departmentChannel);

    public int countQuestionSevenAnswer(String departmentChannel);

    /**
     * 获取某个区域中问题2的数量
     */
    public int countQuestionTwoAnswer(String departmentChannel);

    /**
     * 获取某个区域中问题2的数量
     */
    public int countQuestionFiveAnswer(String questionFiveAnswerA,String questionFiveAnswerB,String departmentChannel);

    public int countQuestionEightAnswer(String type,String departmentChannel);

    public int countQuestionTwoAnswer(String type ,String departmentChannel);

    public List<RegionVO> countKaSr();

    public int countEdit();

    /**
     * 分页查询
     */
    public List<DepartmentInfo> findByType(Integer pageNow, Integer pageSize,String departmentName,String departmentNum,String status);

    public int count(String departmentName,String departmentNum,String status);

	// ******************************************************************************
	// ********************************* CRUD START *********************************
	// ******************************************************************************

	/**
	 * 获取总记录数
	 */
	public Long totalRecord(Map<String, String> queryHash);

	/**
	 * 分页列表
	 */
	public List<DepartmentInfo> findList(Integer pageNow, Integer pageSize, String sqlOrder, Map<String, String> queryHash);

	/**
	 * id获取记录
	 */
	public DepartmentInfo findModel(Long departmentInfoId);

	/**
	 * 增加记录
	 */
	public Integer add(DepartmentInfo model);

	/**
	 * 修改记录
	 */
	public Integer update(DepartmentInfo model);


    // ******************************************************************************
	// ********************************** CRUD END **********************************
	// ******************************************************************************
}